<template>
  <div>
       <!-- 解构插槽prop -->
    <solt v-slot="{adc:aac}">
      {{aac}}
      <!-- <template v-slot:header>456</template>
        464
      <template v-slot:footer>456</template>-->
      <!-- 缩写 -->
      <!-- <template #header>455</template>
      464
      <template #footer>456</template>-->
      <!-- 插槽prop -->
      <!-- <template #header>8</template>
      <template v-slot:default="slotProps">{{slotProps.adc}}</template>
      <template #footer>456</template> -->
    </solt>
  </div>
</template>

<script>
import ajax from "./axios/index";
import solt from "./components/solt";
export default {
  data() {
    return {};
  },
  components: {
    solt
  },
  methods: {
    // aj() {
    //   var ajax = new XMLHttpRequest();
    //   ajax.open("get", "http://localhost:3001/users/user-info?");
    //   ajax.send();
    //   ajax.onreadystatechange = function() {
    //     if (ajax.readyState == 4 && ajax.status == 200) {
    //       console.log(JSON.parse(ajax.responseText));
    //     }
    //   };
    // }
    aj() {
      ajax({
        url: "http://localhost:3001/users/user-info",
        method: "get",
        success: res => {
          console.log(res);
        }
      });
    }
  },
  mounted() {
    this.aj();
  }
};
</script>

<style scoped>
</style>